package org.thss.petri.gef.editparts.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
import org.thss.petri.gef.commands.DeleteNodeCommand;
import org.thss.petri.model.Node;

public class NodeComponentEditPolicy extends ComponentEditPolicy {

	@Override
	protected Command createDeleteCommand(GroupRequest deleteRequest) {
		DeleteNodeCommand command = new DeleteNodeCommand();
		command.setNode((Node) getHost().getModel());
		return command;
	}

}
